const { ApiController } = require('jax')

class Controller extends ApiController {
  // 用户
  get user() {
    return this.ctx.state.admin
  }

  // 用户ID
  get userId() {
    return this.ctx.state.admin.id
  }

  // 社区ID
  get projectId() {
    return this.ctx.state.admin.source.projectId
  }
}

module.exports = Controller
